<template>
	<view class="content">
		<view class="text-area">
			<text class="title">{{token}}login页面</text>
			<!-- data -->
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		checkAuth
	} from '@/utils/auth';
	import {
		onLoad,
		onUnload
	} from "@dcloudio/uni-app";
	const token = ref()
	onLoad((options) => {
		jumpWeixin()
	})

	// 跳转企业微信 并重定向首页的方法
	const jumpWeixin = () => {
		const encodedTarget = encodeURIComponent('/pages/index/callBack');
		const authUrl =
			`https://puhuicaizhi.com/wx/yingyong/login?wantUrl=${encodedTarget}`;
		console.log('authUrl',authUrl);
		window.location.href = authUrl
	}
	onUnload(() => {

	})
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>